 import 'dart:async';

class VideoModel {
  late Timer timer;
  late DateTime lastPopTime ;
  late DateTime indexPopTime ;
  bool isStop=false;
  sentimer(){
    isStop=true;
    indexPopTime=DateTime.now();
     timer=Timer.periodic(const Duration(milliseconds:1000), (Timer timer) {
       lastPopTime = DateTime.now();
       if (lastPopTime.difference(indexPopTime)>const Duration(seconds: 60)) {
         isStop=false;
         timer.cancel();
         print('长按定时结束');
       }
     });
  }

 }